﻿using Com.JunCaiSoft.DBContext;
using Com.JunCaiSoft.NoticeSystem.Dao;
using Com.JunCaiSoft.NoticeSystem.IDao;
using Com.JunCaiSoft.Permission.Dao;
using Com.JunCaiSoft.Permission.IDao;
using Com.JunCaiSoft.Web;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc.ApplicationModels;
using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Com.JunCaiSoft.NoticeSystem.ResourceExtension
{
    public static class NoticeSystemServiceCollectionExtension
    {
        public static IServiceCollection AddNoticeSystem(this IServiceCollection services)
        {
            //添加通知管理注入
            services.TryAddSingleton<INoticeDao>(new NoticeDao(services.BuildServiceProvider().GetService<MSSQLDbContext>()));

            return services;
        }
    }
}
